//#define __DEBUG__
// by Xeno
#define THIS_FILE "fn_getdisplayname.sqf"
#include "x_setup.sqf"

// get displayname of an object
// parameters: type of object (string), what (0 = CfgVehicles, 1 = CfgWeapons, 2 = CfgMagazines)
// example: _dispname = ["UAZ", 0] call FUNC(GetDisplayName);
private ["_obj_name", "_obj_kind", "_cfg"];
PARAMS_2(_obj_name,_obj_kind);
// TYRGHEN - added cfgGlasses
_cfg = switch (_obj_kind) do {case 0: {"CfgVehicles"};case 1: {"CfgWeapons"};case 2: {"CfgMagazines"};case 3: {"CfgGlasses"};};
getText (configFile/_cfg/_obj_name/"displayName")
